From 18d0fed6948ada72aa1c10e3fba365f148a4a252 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 22 Sep 2009 08:00:36 +0100 Subject: [PATCH] x86 hvm: fix missing ticks bug of c/s 20218 With c/s 20218, timer ticks might be missed when IRQs of a timer are queued. "Next scheduled time" is accumulated wrongly. Thanks to Christoph for the report. Signed-off-by: Kouya Shimura Reported-by: Christoph Egger --- xen/arch/x86/hvm/vpt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 1a5804a356..5ed1362082 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -309,7 +309,6 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack) else { pt->scheduled += pt->period; - pt_process_missed_ticks(pt); if ( mode_is(v->domain, one_missed_tick_pending) || mode_is(v->domain, no_missed_ticks_pending) ) @@ -324,7 +323,11 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack) } if ( pt->pending_intr_nr == 0 ) + { + pt_process_missed_ticks(pt); + pt->do_not_freeze = 0; set_timer(&pt->timer, pt->scheduled); + } } if ( mode_is(v->domain, delay_for_missed_ticks) && -- 2.30.2